<div class="layui-form" lay-filter="layPopup" style="padding: 20px 30px 0 0;">
    <div class="layui-form-item">
        <label class="layui-form-label"><span class="required_class">*</span>规则名称</label>
        <div class="layui-input-block">
            <script template type="text/html">
                <input type="text" name="name" value="{{ d.params.name }}" lay-verify="required"
                       placeholder="请输入规则名称"
                       autocomplete="off" class="layui-input">
            </script>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label"><span class="required_class">*</span>控制器</label>
        <div class="layui-input-block" id="xmSelectController"></div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label"><span class="required_class">*</span>对应数据表</label>
        <div class="layui-input-block" id="xmSelectTable"></div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label"><span class="required_class">*</span>数据表主键</label>
        <div class="layui-input-block">
            <script template type="text/html">
                <input type="text" name="primary_key" value="{{ d.params.primary_key }}" lay-verify="required"
                       placeholder="请输入数据表主键"
                       autocomplete="off" class="layui-input">
            </script>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label"><span class="required_class">*</span>敏感字段</label>
        <div class="layui-input-block" id="xmSelectField"></div>
    </div>

    <div id="seSDLayView"></div>

    <div class="layui-form-item">
        <label class="layui-form-label">状态</label>
        <div class="layui-input-block">
            <script template type="text/html">
                {{#  if(d.params.status == '1'){ }}
                <input type="checkbox" lay-filter="statusSwitch" checked lay-skin="switch" title="启用|禁用">
                {{#  } else { }}
                <input type="checkbox" lay-filter="statusSwitch" lay-skin="switch" title="启用|禁用">
                {{#  } }}
            </script>
        </div>
    </div>

    <script id="seSDLayTpl" type="text/html">
        {{# layui.each(d.fieldList, function(index, item){ }}
        <div class="layui-form-item">
            <label class="layui-form-label">{{ item.value }}</label>
            <div class="layui-input-block">
                <input type="text" name="{{ item.value }}_remarks" value="{{ item.remarks }}"
                       placeholder="请输入字段注释" autocomplete="off" class="layui-input">
            </div>
        </div>
        {{# }); }}
    </script>

    <script template type="text/html">
        <input type="hidden" name="id" value="{{ d.params.id }}">
        <input type="hidden" name="controller" value="{{ d.params.controller }}">
        <input type="hidden" name="data_table" value="{{ d.params.data_table }}">
        <input type="hidden" name="status" value="{{ d.params.status }}">
        <input type="hidden" name="field_str" value="{{ d.params.field_str }}">
    </script>
    <div class="layui-form-item">
        <label class="layui-form-label"></label>
        <div class="layui-input-block">
            <input class="layui-btn" lay-filter="laySubmitEdit" lay-submit type="button" value="确认">
        </div>
    </div>
</div>

<script lay-done="layui.data.sendParams(d.params)" template type="text/html"></script>
<script src="../web/res/js/security/sensitiveData/other.js"></script>
